//app.js
App({
  onLaunch: function () {
    // 展示本地存储能力
    const logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)

    // 获取系统信息
    wx.getSystemInfo({
      success: e => {
        this.globalData.statusBar = e.statusBarHeight
        this.globalData.windowHeight = e.windowHeight
      }
    })
  },
  globalData: {
    statusBar: 0,
    windowHeight: 0
  }
})